var express = require('express');
var router = express.Router();
var db = require("../model/db");

router.get("/all", async function (req, res) {
    const data = await db.Stores.find();
    res.send({
        code: 0,
        msg: "",
        count: await db.Stores.countDocuments(),
        data
    });
})

module.exports = router;